package com.baoyouqun.domain.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 发票记录VO（适配页面表格展示）
 */
@Data
public class InvoiceRecordVO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private String id;

    // ---------------------- 页面核心展示字段 ----------------------
    @ApiModelProperty(value = "申请发票人（关联用户表姓名）")
    private String userName; // 页面“申请发票人”

    @ApiModelProperty(value = "申请订单号（关联订单表编号）")
    private String orderId; // 页面“申请订单号”

    @ApiModelProperty(value = "订单类型（如：年VIP会员）")
    private String orderType; // 页面“订单类型”

    @ApiModelProperty(value = "发票金额（元）")
    private BigDecimal totalAmount; // 页面“发票金额”

    @ApiModelProperty(value = "购方名称")
    private String buyerName; // 页面“购方名称”

    @ApiModelProperty(value = "购方税号")
    private String buyerTaxNo; // 页面“购方税号”

    @ApiModelProperty(value = "备注内容")
    private String remark; // 页面“备注内容”

    @ApiModelProperty(value = "开具状态（1-未开具，2-已开具）")
    private Byte status;

    @ApiModelProperty(value = "接收邮箱（用户填写的电子发票推送邮箱，对应图片输入项）")
    private String receiveEmail;

    @ApiModelProperty(value = "开具状态中文描述")
    private String invoiceStatusDesc; // 页面“状态”列展示

    @ApiModelProperty(value = "申请时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    // ---------------------- 关联ID（用于后端逻辑，不返回前端） ----------------------
    @ApiModelProperty(value = "用户ID（关联用户表，后端用）", hidden = true)
    private String userId;

    @ApiModelProperty(value = "原始抬头类型（数据库存储值）", hidden = true)
    private String invoiceTitleType;
}